//
//  NotificationServer.m
//  CYWFrame
//
//  Created by Macx on 2017/8/4.
//  Copyright © 2017年 Macx. All rights reserved.
//

#import "NotificationServer.h"

@implementation NotificationServer

+ (void)homeSendNotificaiontName:(NSString *)name param:(id)param {
    
    //创建通知
    NSNotification *notification =[NSNotification notificationWithName:name object:nil userInfo:param];
    //通过通知中心发送通知
    [[NSNotificationCenter defaultCenter] postNotification:notification];
    
}

+ (void)completeUGCvideoPath:(NSString *)name param:(id)param {
    //创建通知
    NSNotification *notification =[NSNotification notificationWithName:name object:nil userInfo:param];
    //通过通知中心发送通知
    [[NSNotificationCenter defaultCenter] postNotification:notification];
}

//
//通知
//// 父视图发送通知到子视图
//[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeFrame:)name:@"supSendSub" object:nil];
//
//// 生态体征截图
//- (void)sengImage:(NSNotification
//                   *)text {
//    NSLog(@"image = %@",text.userInfo[@"textOne"]);
//    UIImage *tmpImage = text.userInfo[@"textOne"];
//    [self sendImageMessage:tmpImage];
//    NSLog(@"－－－－－发送图片接收到通知------");
//}
//
////移除广播监听。
//-(void)dealloc{
//    [[NSNotificationCenter defaultCenter]removeObserver:self];
//}
//
//// 发送通知
////添加 字典，将TextField的值通过key值设置传递
//NSDictionary *dict =[[NSDictionaryalloc]initWithObjectsAndKeys:action,@"textOne", nil];
//
////创建通知
//NSNotification *notification =[NSNotification notificationWithName:@"changeType" object:nil userInfo:dict];
//
////通过通知中心发送通知
//[[NSNotificationCenter defaultCenter] postNotification:notification];
//
@end
